package com.obas.business.customer.event 
{
	import mx.collections.ArrayCollection;
	import com.ease.common.vo.Ordering;
	import com.ease.common.vo.Pagination;
	import com.ease.framework.CommandCompletionEvent;
	import com.obas.model.business.Customer;
	
	import flash.events.Event;
	
	[Response(name="{RETURN_ID}", type="com.ease.framework.CommandCompletionEvent")]
	public class CustomerManagementEvent extends Event
	{

		public static const REQUEST_ID:String="CustomerManagementEvent_Request";

		public static const RETURN_ID:String="CustomerManagementEvent_Return";
		
		public static const OPERATION_QUERY:String="OPERATION_QUERY";
		
		public static const OPERATION_CREATE:String="OPERATION_CREATE";
		
		public static const OPERATION_REMOVE:String="OPERATION_REMOVE";
		
		private var _accounts:ArrayCollection;
		
		private var _actionType:String;
		
		private var _account:Customer;
		
		private var _pagination:Pagination;
		
		private var _ordering:Ordering;		

		public function CustomerManagementEvent(actionType:String=OPERATION_QUERY, type:String=REQUEST_ID)
		{
			super(type, true, true);		
			_actionType=actionType;
		}


		public function get accounts():ArrayCollection
		{
			return _accounts;
		}

		public function set accounts(value:ArrayCollection):void
		{
			_accounts = value;
		}

		public function get account():Customer
		{
			return _account;
		}

		public function set account(value:Customer):void
		{
			_account = value;
		}

		public function get pagination():Pagination
		{
			return _pagination;
		}

		public function set pagination(value:Pagination):void
		{
			_pagination = value;
		}

		public function get ordering():Ordering
		{
			return _ordering;
		}

		public function set ordering(value:Ordering):void
		{
			_ordering = value;
		}

		public override function clone():Event
		{
			var event:CustomerManagementEvent=new CustomerManagementEvent(actionType, type);
			event.pagination=pagination;
			event.ordering=ordering;
			event.account=account;
			event.accounts=accounts;
			return event;
		}
		
		public function get actionType():String
		{
			return _actionType;
		}
		
	}
}